﻿<controls:ChildWindow x:Class="MedLink2011.Controls.WebcamWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="531" Height="472" 
           Title="Take Photo" IsEnabled="True" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
        <Rectangle Height="205" HorizontalAlignment="Left" Margin="12,17,0,0" Name="webcamRectangle" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="255" />
        <Button Content="Take Photo" Height="79" HorizontalAlignment="Left" Margin="352,72,0,0" Name="photoButton" VerticalAlignment="Top" Width="78" Click="photoButton_Click" />
        <ListBox Height="160" Margin="12,238,13,0" Name="picturesListBox" VerticalAlignment="Top" AllowDrop="True" Drop="picturesListBox_Drop">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Image Source="{Binding Converter={StaticResource imageConverter}}" Stretch="UniformToFill" Height="150"/>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</controls:ChildWindow>